import 'package:flutter/material.dart';
import 'package:hospitable_rental/pages/home/home/home_advisory.dart';
import 'package:hospitable_rental/pages/home/home/home_navigator.dart';
import 'package:hospitable_rental/routes/routes.dart';
import 'package:hospitable_rental/widgets/common_swiper.dart';
import 'package:hospitable_rental/widgets/search_bar/index.dart';
import 'home_recommend.dart';

class HomeIndex extends StatelessWidget {
  const HomeIndex({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: SearchBar(
          showLocation: true,
          showMap: true,
          onSearch: () => Navigator.of(context).pushNamed(Routes.notFound),
        ),
        backgroundColor: Colors.white,
      ),
      body: ListView(
        children: [
          CommonSwiper(),
          HomeNavigator(),
          HomeRecommend(),
          AdvisoryWidget(),
        ],
      ),
    );
  }
}
